#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import os
import time
from multiprocessing import Process


def task():
    print("子程序id: {}".format(os.getpid()))
    time.sleep(10)

if __name__ == '__main__':
    p = Process(target=task)
    p.start()       # 给操作系统创建子进程的信号
    # p.join()
    print("主: {}".format(os.getpid()))
